package com.mming.sso.bean;

import com.mming.sso.entity.User;
import lombok.Data;

@Data
public class UserInfo {
    private Integer id;

    private String username;

    private long phoneNumber = 0;

    private String mail = "mail";

    private String lastLoginIp = "0.0.0.0";

    private int state = 0;

    public UserInfo(User user) {
        setId(user.getId());
        setUsername(user.getUsername());
        setPhoneNumber(user.getPhoneNumber());
        setLastLoginIp(user.getLastLoginIp());
        setMail(user.getMail());
        setState(user.getState());
    }
}
